Next | Prev | Up | Top | Contents | Index
Frame Scheduling
Instead of scheduling processes according to priorities with an attempt at fairness, the Frame Scheduler dispatches them according to a strict, cyclic rotation governed by a repetitive time base. The time base determines the fundamental frame rate. (See "Selecting a Time Base".)
The interrupts from the time base define minor frames. You tell the Frame Scheduler a fixed number of minor frames that should be considered a major frame. The length of a major frame defines the application's true frame rate. The minor frames allow you to divide a major frame into sub-frames. Major and minor frames are depicted in Figure 7-1.

Figure 7-1 : Major and Minor Frames
As pictured in Figure 7-1, the Frame Scheduler maintains a queue of processes for each minor frame. You enqueue each activity processes of your program to a specific minor frame. You determine the order of cyclic execution within a minor frame by the order in which you enqueue processes. You can:
- Enqueue multiple processes in one minor frame. They are run in queue sequence within the frame. All must complete their work within the minor frame interval.
- Enqueue the same process to run in more than one minor frame. Say that process double is to run twice as often as process solo. You could enqueue double to Q0 and Q2 in Figure 7-1, and enqueue solo to Q1.
- Enqueue a process that takes more than a minor frame to complete its work. If process sloth could need more than one minor interval, you could enqueue it to Q0, Q1 and Q2 in Figure 7-1, such that it would be able to continue working in all three minor frames until it completed.
- Enqueue a background process that is allowed to run only when all others have completed, to use up any remaining time within a minor frame.
All these options are controlled by scheduling disciplines you specify for each process as you enqueue it (see "Using the Scheduling Disciplines").
The processes that a Frame Scheduler dispatches are typically child processes of the process that creates the Frame Scheduler, but that is not a requirement. Any process can be enqueued, even one that starts execution as a separate command.
The FRS Control Process
The process that creates a Frame Scheduler is called the frs control process. It is privileged in three respects:
- Its process ID (PID) is used to identify its Frame Scheduler in various functions.
- It can receive signals when errors are detected by the Frame Scheduler (see "Using Signals Under the Frame Scheduler").
- It cannot itself be enqueued to the Frame Scheduler. It continues to be dispatched by IRIX. It executes on some other CPU than the one the Frame Scheduler uses.
Next | Prev | Up | Top | Contents | Index